#pragma once

#include <iostream>
#include <string>
#include <unistd.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <fcntl.h>

const std::string gpath = "/home/ubuntu/112/linux/lesson24-fifo";
int gprojId = 0x6666;
// 操作系统，申请空间，是按照块为单位的：4KB，1KB，2KB
int gshmsize = 4096;
mode_t gmode = 0600;

std::string ToHex(key_t k)
{
    char buffer[64];
    snprintf(buffer,sizeof(buffer), "0x%x", k);
    return buffer;
}